#include "stm32f10x.h"

typedef  struct
{
	u8 Rx_Flag;
	u8 Rx_Er;
	u8 Trans_Flag;
	u8 Rx_Buf[1024 + 10];
	u16	Rx_Index;
	u16	Rx_Num;
} Usart_Struct;

extern Usart_Struct	Usart1;

extern u16 usartTimeout;

extern u8 usartSendFlag;
extern u16 usartInterval;

void Usart_Init(void);

void USART_SendString(u8 * ptr);
void USART_SendBuf(USART_TypeDef* USARTx, u8 *buf, u16 len);
u8 USART_SendMsg(u16 id,u8 *buf, u16 len);
void USART_DecodeMsg(void);

